diff options
| -rw-r--r-- | nimterop/getters.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nimterop/getters.nim b/nimterop/getters.nim index abc292b..bdf92f2 100644 --- a/nimterop/getters.nim +++ b/nimterop/getters.nim @@ -1,3 +1,5 @@ +{.experimental: "codeReordering".} + import macros, os, strformat, strutils, tables import regex @@ -44,14 +46,15 @@ const gTypeMap = { "unsigned char": "cuchar", "unsigned short": "cushort", "unsigned int": "cuint", - "unsigned long long": "culonglong" + "unsigned long long": "culonglong", + "time_t": "int32" }.toTable() proc sanitizePath*(path: string): string = path.multiReplace([("\\\\", $DirSep), ("\\", $DirSep), ("//", $DirSep)]) proc getIdentifier*(str: string): string = - result = str.strip(chars={'_'}).replace(re"_+", "_") + result = str.strip(chars={'_'}).replace(re"_+", "_").getType() if result in gReserved: result = &"`{result}`" |
