nim-lang / Nim

Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
https://nim-lang.org
Other
16.63k stars 1.47k forks source link

fixes #24434; C gen issue using nim-lang/opengl #24435

Closed ringabout closed 1 week ago

ringabout commented 1 week ago

fixes #24434

In https://github.com/nim-lang/Nim/pull/24432

let ex = "NIM_EXTERNC N_NIMCALL(void, nimLoadProcs$1)(void) {$2}$N$N" %
        [(i.ord - '0'.ord).rope, extract(el)]
procs.addDeclWithVisibility(ExternC):
   procs.addProcHeader(ccNimCall, "nimLoadProcs" & $(i.ord - '0'.ord), "void", cProcParams())

extern "C" makes a function-name in C++ have C linkage; it should be effaced with C compiler

github-actions[bot] commented 1 week ago

Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from cd9ce377f886ddfb81efc7d81f2ad3b7930ad045

Hint: mm: orc; opt: speed; options: -d:release 177696 lines; 8.640s; 653.516MiB peakmem