# Pointer classes are used to manipulate extern C structures.
extern class Pointer
+ # C `NULL` pointer
+ new nul `{ return NULL; `}
+
# Is the address behind this Object at NULL?
fun address_is_null: Bool `{ return self == NULL; `}
redef fun is_empty do return items.is_empty
redef fun length do return items.length
redef fun iterator do return items.iterator
+ redef fun clear do items.clear
redef fun peek do return items.first
redef fun add(e)
../lib/core/kernel.nit:601,1--705,3: Error: `kernel$Byte` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
../lib/core/kernel.nit:707,1--885,3: Error: `kernel$Int` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
../lib/core/kernel.nit:887,1--1055,3: Error: `kernel$Char` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
-../lib/core/kernel.nit:1057,1--1071,3: Error: `kernel$Pointer` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
-../lib/core/kernel.nit:1073,1--1082,3: Error: `kernel$Task` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
+../lib/core/kernel.nit:1057,1--1074,3: Error: `kernel$Pointer` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
+../lib/core/kernel.nit:1076,1--1085,3: Error: `kernel$Task` does not specialize `module_0$Object`. Possible duplication of the root class `Object`?
Discrete -> Char [dir=back arrowtail=open style=dashed];
Pointer [
- label = "{Pointer||+ address_is_null(): Bool\l+ free()\l- native_equals(o: Pointer): Bool\l}"
+ label = "{Pointer||+ nul(): Pointer\l+ address_is_null(): Bool\l+ free()\l- native_equals(o: Pointer): Bool\l}"
]
Object -> Pointer [dir=back arrowtail=open style=dashed];
Discrete -> Char [dir=back arrowtail=open style=dashed];
Pointer [
- label = "{Pointer||+ address_is_null(): Bool\l+ free()\l}"
+ label = "{Pointer||+ nul(): Pointer\l+ address_is_null(): Bool\l+ free()\l}"
]
Object -> Pointer [dir=back arrowtail=open style=dashed];