Ejemplo n.º 1
0
IoDynLib *IoDynLib_setPath(IoDynLib *self, IoObject *locals, IoMessage *m)
{
	/*doc DynLib setPath(aString)
	Sets the path to the dynamic library. Returns self.
	*/

	DynLib_setPath_(DATA(self),
					CSTRING(IoMessage_locals_symbolArgAt_(m, locals, 0)));
	return self;
}
Ejemplo n.º 2
0
void *IoCFFILibrary_rawGetFuctionPointer_(IoCFFILibrary *self, const char *name)
{
	DynLib *library = DATA(self)->library;

	if (!library)
	{
		const char *name = CSTRING(IoObject_getSlot_(self, IOSYMBOL("name")));

		library = DATA(self)->library = DynLib_new();
		DynLib_setPath_(library, name);
		DynLib_open(library);
	}

	return DynLib_pointerForSymbolName_(library, name);
}
Ejemplo n.º 3
0
DynLib *DynLib_new(void)
{
	DynLib *self = (DynLib *)io_calloc(1, sizeof(DynLib));
	DynLib_setPath_(self, "");
	return self;
}