Ronald Oussoren avatar Ronald Oussoren committed 45eb15b

Reneable code that recognizes pointers-to-structs in pointer-support.m. Someone
had disabled this code without understanding why the code was there. This code
recognizes that '^{NSModalSession}' is the same as '^{NSModalSession=ffff}'.

This is needed because @encode(structPtr) returns the second result when the
full declaration of a struct is seen while the first result is returned when
there's just a forward declaration.

Comments (0)

Files changed (1)


 static int item_count = 0;
 static int find_offset(const char* signature) {
-	/* XXX:
-	 * I don't know what the heck this was supposed to do
-	 */
-#if 0
 	if (signature[1] == _C_STRUCT_B) {
 		int o1, o2;
 		return (o1 < o2) ? o1 : o2;
 	return strlen(signature);
 	for (i = 0; i < item_count; i++) {
 		if (strncmp(signature, items[i].signature, items[i].offset) == 0) {
 			return &items[i];
-			/* XXX: What was this supposed to do? */
-#if 0
 			if (signature[1] != _C_STRUCT_B || signature[items[i].offset] == '=' || signature[items[i].offset] == _C_STRUCT_E) {
 				return &items[i];
 	return NULL;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.