diff --git a/cimport.html b/cimport.html
index 7cfdec1..3e05dde 100644
--- a/cimport.html
+++ b/cimport.html
@@ -1265,6 +1265,8 @@ function main() {
title="cOverride(body): untyped">
When the wrapper code generated by nimterop is missing certain symbols or not accurate, it may be required to hand wrap them. Define them in a cOverride() macro block so that Nimterop no longer defines these symbols.
For example:
-int svGetCallerInfo(const char** fileName, int *lineNumber);
This could get mapped to:
+int svGetCallerInfo(const char** fileName, int *lineNumber);
This might map to:
proc svGetCallerInfo(fileName: ptr cstring; lineNumber: var cint)
Whereas it might mean:
cOverride: proc svGetCallerInfo(fileName: var cstring; lineNumber: var cint)
Using the cOverride() block, nimterop can be instructed to skip over svGetCallerInfo(). This works for procs, consts and types.
@@ -1332,7 +1334,34 @@ function main() {macro cSkipSymbol(skips: varargs[string]): untyped
cSkipSymbol "proc1", "Type2"+Similar to cOverride(), this macro allows filtering out symbols not of interest from the generated output. +
Examples:
+cSkipSymbol "proc1", "Type2"+ +
macro cPlugin(body): untyped
proc onSymbol(sym: var Symbol) {.exportc, dynlib.}
onSymbol() can be used to handle symbol name modifications required due to invalid characters like leading/trailing _ or rename symbols that would clash due to Nim's style insensitivity. It can also be used to remove prefixes and suffixes like SDL_. The symbol name and type is provided to the callback and the name can be modified.
+Returning a blank name will result in the symbol being skipped. This will fail for nskParam and nskField since the generated Nim code will be wrong.
+Symbol types can be any of the following:
+nimterop/plugins is implicitly imported to provide access to standard plugin facilities.
+ +Examples:
+cPlugin: + import + strutils + + proc onSymbol*(sym: var Symbol) {...}{.exportc, dynlib.} = + sym.name = sym.name.strip(chars = {'_'}) +
macro cAddStdDir(mode = "c"): untyped
Add the standard c [default] or cpp include paths to search path used in calls to cSearchPath()
-This allows something like this:
-cAddStdDir() -cImport cSearchPath("math.h")+
This allows something like this:
+ +Examples:
+cAddStdDir() +echo cSearchPath("math.h")