Skip to content

Instantly share code, notes, and snippets.

@lizmat

lizmat/result.md Secret

Created February 11, 2025 21:30
rakkable: rakudo-c 'strcmp'

nqp/MoarVM/src/core/nativecall.c

62: if (strcmp(ctypename, "void") == 0) {
70: else if (strcmp(ctypename, "char") == 0)
72: else if (strcmp(ctypename, "short") == 0)
74: else if (strcmp(ctypename, "int") == 0)
76: else if (strcmp(ctypename, "long") == 0)
78: else if (strcmp(ctypename, "longlong") == 0)
80: else if (strcmp(ctypename, "uchar") == 0)
82: else if (strcmp(ctypename, "ushort") == 0)
84: else if (strcmp(ctypename, "uint") == 0)
86: else if (strcmp(ctypename, "ulong") == 0)
88: else if (strcmp(ctypename, "ulonglong") == 0)
90: else if (strcmp(ctypename, "float") == 0)
92: else if (strcmp(ctypename, "double") == 0)
94: else if (strcmp(ctypename, "asciistr") == 0)
96: else if (strcmp(ctypename, "utf8str") == 0)
98: else if (strcmp(ctypename, "utf16str") == 0)
100: else if (strcmp(ctypename, "cstruct") == 0)
102: else if (strcmp(ctypename, "cppstruct") == 0)
104: else if (strcmp(ctypename, "cpointer") == 0)
106: else if (strcmp(ctypename, "carray") == 0)
108: else if (strcmp(ctypename, "cunion") == 0)
110: else if (strcmp(ctypename, "vmarray") == 0)
112: else if (strcmp(ctypename, "callback") == 0)


nqp/MoarVM/src/core/nativecall_dyncall.c

11: if (strcmp(cname, "cdecl") == 0)
13: else if (strcmp(cname, "stdcall") == 0)
15: else if (strcmp(cname, "thisgnu") == 0)
17: else if (strcmp(cname, "thisms") == 0)
19: else if (strcmp(cname, "stdcall") == 0)


nqp/MoarVM/src/core/nativecall_libffi.c

55: //~ if (strcmp(cname, "cdecl") == 0)
57: //~ else if (strcmp(cname, "stdcall") == 0)
59: //~ else if (strcmp(cname, "stdcall") == 0)


nqp/MoarVM/src/core/uni_hash_table.c

161: if (entry->hash_val == hash_val && 0 == strcmp(entry->key, key)) {


nqp/MoarVM/src/core/uni_hash_table_funcs.h

107: if (entry->hash_val == hash_val && 0 == strcmp(entry->key, key)) {


nqp/MoarVM/src/main.c

108: return strcmp(key, (char *)value);


nqp/MoarVM/src/profiler/heapsnapshot.c

111: if (strcmp(col->strings[i], str) == 0) {
218: if (strcmp(ss->col->strings[cache], (char )cstr) == 0) {


nqp/MoarVM/src/profiler/log.c

210: if (strcmp(callbody->sym_name,


nqp/MoarVM/src/strings/utf8.c

671: else if (strcmp("Cs", gencat) == 0) {


nqp/src/vm/moar/runner/main.c

46: return strcmp(key, (char *)value);


src/vm/moar/runner/main.c

49: return strcmp(key, (char *)value);


t/04-nativecall/02-simple-args.c

67: if (0 == strcmp(pass_msg, "ok 6 - passed a string"))
76: if ((pass % 2 == 0) && pass_msg != NULL && 0 == strcmp(pass_msg, "ok 6 - passed a string"))
89: if (0 == strcmp(cached_str, "ok 7 - checked previously passed string"))


t/04-nativecall/04-pointers.c

18: int x = strcmp("Got passed back the pointer I returned", ptr) == 0;


t/04-nativecall/06-struct.c

113: if(strcmp(obj->first, "Lorem")) return 1;
114: if(strcmp(obj->second, "ipsum")) return 2;


t/04-nativecall/08-callbacks.c

48: if(strcmp(str, "Herps and derps")) return 1;
55: if(strcmp(s->str, "Tweedledum, tweedledee")) return 2;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment