diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/pure/pegs.nim | 2 | ||||
-rwxr-xr-x | lib/pure/xmldom.nim | 2 | ||||
-rwxr-xr-x | lib/system.nim | 7 | ||||
-rwxr-xr-x | lib/system/alloc.nim | 2 | ||||
-rwxr-xr-x | lib/wrappers/gtk/glib2.nim | 6 | ||||
-rwxr-xr-x | lib/wrappers/python.nim | 2 |
6 files changed, 12 insertions, 9 deletions
diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index e37c072f1..4e31ffc0c 100755 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -1057,7 +1057,7 @@ type charset: set[char] ## if kind == tkCharSet index: int ## if kind == tkBackref - TPegLexer = object ## the lexer object. + TPegLexer {.inheritable.} = object ## the lexer object. bufpos: int ## the current position within the buffer buf: cstring ## the buffer itself LineNumber: int ## the current line number diff --git a/lib/pure/xmldom.nim b/lib/pure/xmldom.nim index 97cf3caeb..47e94243e 100755 --- a/lib/pure/xmldom.nim +++ b/lib/pure/xmldom.nim @@ -58,7 +58,7 @@ type Features: seq[Feature] # Read-Only PNode* = ref Node - Node = object + Node = object of TObject attributes*: seq[PAttr] childNodes*: seq[PNode] FLocalName: string # Read-only diff --git a/lib/system.nim b/lib/system.nim index 01b85a4d6..b40f161f1 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -171,9 +171,12 @@ proc `..`*[T](b: T): TSlice[T] {.noSideEffect, inline.} = proc contains*[T](s: TSlice[T], value: T): bool {.noSideEffect, inline.} = result = value >= s.a and value <= s.b +when not defined(niminheritable): + {.pragma: inheritable.} + when not defined(EcmaScript) and not defined(NimrodVM): type - TGenericSeq {.compilerproc, pure.} = object + TGenericSeq {.compilerproc, pure, inheritable.} = object len, reserved: int PGenericSeq {.exportc.} = ptr TGenericSeq # len and space without counting the terminating zero: @@ -197,7 +200,7 @@ type ## is an int type ranging from one to the maximum value ## of an int. This type is often useful for documentation and debugging. - TObject* {.exportc: "TNimObject".} = + TObject* {.exportc: "TNimObject", inheritable.} = object ## the root of Nimrod's object hierarchy. Objects should ## inherit from TObject or one of its descendants. However, ## objects that have no ancestor are allowed. diff --git a/lib/system/alloc.nim b/lib/system/alloc.nim index 53c20316c..5182d5ccf 100755 --- a/lib/system/alloc.nim +++ b/lib/system/alloc.nim @@ -113,7 +113,7 @@ type PChunk = ptr TBaseChunk PBigChunk = ptr TBigChunk PSmallChunk = ptr TSmallChunk - TBaseChunk {.pure.} = object + TBaseChunk {.pure, inheritable.} = object prevSize: int # size of previous chunk; for coalescing size: int # if < PageSize it is a small chunk used: bool # later will be optimized into prevSize... diff --git a/lib/wrappers/gtk/glib2.nim b/lib/wrappers/gtk/glib2.nim index b69b708fe..4151ba954 100755 --- a/lib/wrappers/gtk/glib2.nim +++ b/lib/wrappers/gtk/glib2.nim @@ -107,7 +107,7 @@ type g_class*: PGTypeClass PGTypeInterface* = ptr TGTypeInterface - TGTypeInterface*{.pure.} = object + TGTypeInterface*{.pure, inheritable.} = object g_type*: GType g_instance_type*: GType @@ -993,7 +993,7 @@ proc plugin_complete_interface_info*(plugin: PGTypePlugin, dynlib: gliblib, importc: "g_type_plugin_complete_interface_info".} type PGObject* = ptr TGObject - TGObject*{.pure.} = object + TGObject*{.pure, inheritable.} = object g_type_instance*: TGTypeInstance ref_count*: guint qdata*: PGData @@ -1006,7 +1006,7 @@ type TGWeakNotify* = proc (data: gpointer, where_the_object_was: PGObject){.cdecl.} PGObjectConstructParam* = ptr TGObjectConstructParam PGObjectClass* = ptr TGObjectClass - TGObjectClass*{.pure.} = object + TGObjectClass*{.pure, inheritable.} = object g_type_class*: TGTypeClass construct_properties*: PGSList constructor*: proc (theType: GType, n_construct_properties: guint, diff --git a/lib/wrappers/python.nim b/lib/wrappers/python.nim index 3d0b923e2..3e6543765 100755 --- a/lib/wrappers/python.nim +++ b/lib/wrappers/python.nim @@ -341,7 +341,7 @@ type float*: float64 imag*: float64 - TPyObject*{.pure.} = object + TPyObject*{.pure, inheritable.} = object ob_refcnt*: int ob_type*: PPyTypeObject |