ObjFW  Diff

Differences From Artifact [78e8296fc9]:

To Artifact [fccb9d70a0]:

  • File src/OFPlugin.m — part of check-in [033054ad75] at 2009-05-29 19:21:57 on branch trunk — A few renames.

    OFExceptions:
    * OFNoMemException to OFOutOfMemoryException.
    * OFMemNotPartOfObjException to OFMemoryNotPartOfObjectException.

    OFObject:
    * -[addItemToMemoryPool:] to -[addMemoryToPool:].
    * -[allocWithSize:] to -[allocMemoryWithSize:].
    * -[allocNItems:withSize] to -[allocMemoryForNItems:withSize:].
    * -[resizeMem:toSize] to -[resizeMemory:toSize:].
    * -[resizeMem:toNItems:withSize:] to
    -[resizeMemoryToNItems:withSize:].
    * -[freeMem] to -[freeMemory:].

    OFString:
    * -[urlencode] to -[urlEncodedString].
    * -[urldecode] to -[urlDecodedString]. (user: js, size: 1382) [annotate] [blame] [check-ins using]


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	OFPlugin *(*init_plugin)();
	OFPlugin *plugin;

	pathlen = [path length];
	suffixlen = strlen(PLUGIN_SUFFIX);

	if ((file = malloc(pathlen + suffixlen + 1)) == NULL) {
		@throw [OFNoMemException newWithClass: self
					      andSize: pathlen +
					      suffixlen + 1];
	}
	memcpy(file, [path cString], pathlen);
	memcpy(file + pathlen, PLUGIN_SUFFIX, suffixlen);
	file[pathlen + suffixlen] = 0;

	if ((handle = dlopen(file, RTLD_NOW)) == NULL) {
		free(file);







|
|
|







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	OFPlugin *(*init_plugin)();
	OFPlugin *plugin;

	pathlen = [path length];
	suffixlen = strlen(PLUGIN_SUFFIX);

	if ((file = malloc(pathlen + suffixlen + 1)) == NULL) {
		@throw [OFOutOfMemoryException newWithClass: self
						    andSize: pathlen +
							     suffixlen + 1];
	}
	memcpy(file, [path cString], pathlen);
	memcpy(file + pathlen, PLUGIN_SUFFIX, suffixlen);
	file[pathlen + suffixlen] = 0;

	if ((handle = dlopen(file, RTLD_NOW)) == NULL) {
		free(file);