MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / cs_bcl_alias

Function cs_bcl_alias

internal/cbm/doclink_cs.c:625–642  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

623}
624
625static const char *cs_bcl_alias(const char *base, size_t len) {
626 static const struct {
627 const char *bcl;
628 const char *kw;
629 } map[] = {
630 {"Int32", "int"}, {"Int64", "long"}, {"Int16", "short"}, {"Byte", "byte"},
631 {"SByte", "sbyte"}, {"UInt32", "uint"}, {"UInt64", "ulong"}, {"UInt16", "ushort"},
632 {"Single", "float"}, {"Double", "double"}, {"Decimal", "decimal"}, {"Boolean", "bool"},
633 {"Char", "char"}, {"String", "string"}, {"Object", "object"}, {"IntPtr", "nint"},
634 {"UIntPtr", "nuint"}, {"Void", "void"},
635 };
636 for (size_t i = 0; i < sizeof(map) / sizeof(map[0]); i++) {
637 if (strlen(map[i].bcl) == len && memcmp(map[i].bcl, base, len) == 0) {
638 return map[i].kw;
639 }
640 }
641 return NULL;
642}
643
644size_t cbm_doclink_cs_norm_type(const char *in, size_t len, char *out, size_t cap) {
645 if (!out || cap == 0) {

Callers 1

cbm_doclink_cs_norm_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected