示例#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;
}
示例#2
0
文件: IoCFFILibrary.c 项目: anthem/io
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);
}
示例#3
0
文件: DynLib.c 项目: Abioy/basekit
DynLib *DynLib_new(void)
{
	DynLib *self = (DynLib *)io_calloc(1, sizeof(DynLib));
	DynLib_setPath_(self, "");
	return self;
}