Macaulay2 » Documentation
Packages » ForeignFunctions :: ForeignObject
next | previous | forward | backward | up | index | toc

ForeignObject -- foreign object

Description

A ForeignObject represents some C object. It consists of a Pointer with its address in memory.

i1 : x = int 5

o1 = 5

o1 : ForeignObject of type int32
i2 : peek x

o2 = int32{Address => 0x719ba80a3b80}

To get this, use address.

i3 : address x

o3 = 0x719ba80a3b80

o3 : Pointer

Use class to determine the type of the object.

i4 : class x

o4 = int32

o4 : ForeignIntegerType

Types of foreign object :

Functions and methods returning a foreign object :

Methods that use a foreign object :

For the programmer

The object ForeignObject is a self initializing type, with ancestor classes HashTable < Thing.