Skip to content

Commit

Permalink
Clang-tidy for C source files
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoinvaz committed Aug 20, 2024
1 parent eded02c commit 691f205
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 176 deletions.
29 changes: 15 additions & 14 deletions interop.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,29 @@

/*********************************************************************/

bool Interop_CreateInstance(const char *TypeName, char *InstanceId, int32_t InstanceIdLength, void *ExecuteUserPtr,
Interop_ExecuteCallback Execute, Interop_InvokeInstanceCallback *InvokeInstance,
Interop_ReleaseInstanceCallback *ReleaseInstance,
Interop_ProcessInstanceCallback *ProcessInstance, void **UserPtr) {
if (strcmp(TypeName, "SSN.Simple") == 0) {
void *Context = Simple_Create();
Simple_GetInstanceId(Context, InstanceId, InstanceIdLength);

*InvokeInstance = Simple_Invoke;
*ReleaseInstance = Simple_Release;
*ProcessInstance = NULL;
bool Interop_CreateInstance(const char *type_name, char *instance_id, int32_t instance_id_length,
void *execute_user_ptr, Interop_ExecuteCallback execute,
Interop_InvokeInstanceCallback *invoke_instance,
Interop_ReleaseInstanceCallback *release_instance,
Interop_ProcessInstanceCallback *process_instance, void **user_ptr) {
if (strcmp(type_name, "SSN.Simple") == 0) {
void *context = Simple_Create();
Simple_GetInstanceId(context, instance_id, instance_id_length);

*invoke_instance = Simple_Invoke;
*release_instance = Simple_Release;
*process_instance = NULL;

// Uncomment this line in if you want the process call
// *ProcessInstance = Simple_Process;
// *process_instance = Simple_Process;

*UserPtr = Context;
*user_ptr = context;
return true;
}
return false;
}

bool Interop_SetOption(const char *Key, void *Value) {
bool Interop_SetOption(const char *key, void *value) {
return true;
}

Expand Down
Loading

0 comments on commit 691f205

Please sign in to comment.