ObjFW  Check-in [edc67e0190]

Overview
Comment:OFMethod: Add one more NULL check.

This makes sure we never compare anything with NULL.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.7
Files: files | file ages | folders
SHA3-256: edc67e019017318fe8ef2d77a0088e7a8885f34183b845cb56b5456d6c94058d
User & Date: js on 2012-12-02 16:42:27
Other Links: branch diff | manifest | tags
Context
2012-12-06
01:08
runtime.h: Remove functions which are elsewhere. check-in: caea9cb377 user: js tags: 0.7
2012-12-02
16:42
OFMethod: Add one more NULL check. check-in: edc67e0190 user: js tags: 0.7
16:42
Add a warning about mutating objects in a set. check-in: c07d060cd8 user: js tags: 0.7
Changes

Modified src/OFIntrospection.m from [2b8f65eef1] to [e8a22a012c].

111
112
113
114
115
116
117


118
119
120
121
122
123
124
125

	if (![otherMethod->name isEqual: name])
		return NO;

	if ((otherMethod->typeEncoding == NULL && typeEncoding != NULL) ||
	    (otherMethod->typeEncoding != NULL && typeEncoding == NULL))
		return NO;


	if (strcmp(otherMethod->typeEncoding, typeEncoding))
		return NO;

	return YES;
}

- (uint32_t)hash
{







>
>
|







111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

	if (![otherMethod->name isEqual: name])
		return NO;

	if ((otherMethod->typeEncoding == NULL && typeEncoding != NULL) ||
	    (otherMethod->typeEncoding != NULL && typeEncoding == NULL))
		return NO;

	if (otherMethod->typeEncoding != NULL && typeEncoding != NULL &&
	    strcmp(otherMethod->typeEncoding, typeEncoding))
		return NO;

	return YES;
}

- (uint32_t)hash
{