Skip to content

Commit

Permalink
added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jackyk02 committed Jun 28, 2023
1 parent 36f6069 commit eb70904
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,7 @@ protected void deserialize(
value = action.getName();
FedNativePythonSerialization pickler = new FedNativePythonSerialization();
result.pr(pickler.generateNetworkDeserializerCode(value, null));
// changed
// result.pr("lf_set(" + receiveRef + ", "
// + FedSerialization.deserializedVarName + ");\n");
// Use token to set ports
// Use token to set ports and destructor
result.pr(
"lf_token_t* token = lf_new_token((void*)"
+ receiveRef
Expand Down Expand Up @@ -190,7 +187,7 @@ protected void serializeAndSend(
result.pr(pickler.generateNetworkSerializerCode(variableToSerialize, null));
result.pr("size_t message_length = " + lengthExpression + ";");
result.pr(sendingFunction + "(" + commonArgs + ", " + pointerExpression + ");\n");
// FIXED: Decrease the reference count of serialized_pyobject
// Decrease the reference count for serialized_pyobject
result.pr("Py_XDECREF(serialized_pyobject);\n");
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ public StringBuilder generateNetworkDeserializerCode(String varName, String targ
+ varName
+ "->token->length);\n");
// Deserialize using Pickle
// FIXED: We should not manually increase the reference count for message_byte_array
// deserializerCode.append("Py_XINCREF(message_byte_array);\n");
deserializerCode.append(
"PyObject* "
+ deserializedVarName
Expand Down

0 comments on commit eb70904

Please sign in to comment.