Ronald Oussoren avatar Ronald Oussoren committed 5495cba

- Fix NSRectFillList
- Prepare for 1.0rc3

Comments (0)

Files changed (4)

pyobjc/Modules/AppKit/_AppKit.m

 	}
 
 
-	if (rectCount < -1 ) {
+	if (rectCount < 0) {
 		Py_DECREF(seq);
 		PyErr_SetString(PyExc_ValueError, "RectCount was less than zero.");
 		return NULL;
 	}
 
-#warning The (*4) in the following is bogus.
-	/* Without it, we crash with what appears to be corrupted memory.  I don't know why but figure that not crashing is preferable to crashing until one of us has time to figure this out.  Really,  I suspect Ronald will take one look at this and, being about 10x brighter than me at this sort of thing, will know exactly what is wrong...  :-) */
 	rects = malloc((rectCount * sizeof(NSRect)) * 4);
 	if (rects == NULL) {
 		PyErr_NoMemory();
 		return NULL;
 	}
 
-	len = PySequence_Fast_GET_SIZE(seq);
-	for (i = 0; i < len; i++) {
+	for (i = 0; i < rectCount; i++) {
 		PyObject* v = PySequence_Fast_GET_ITEM(seq, i);
 		int r  = PyObjC_PythonToObjC(@encode(NSRect), v, rects + i);
 		if (r == -1) {
 			return NULL;
 		}
 	}
-
+	Py_DECREF(seq);
 	NSRectFillList(rects, rectCount);
 
 	free(rects);
 	int i;
 
 	if (value == NULL) {
-		return PyDict_SetItemString(d, name, Py_None);
+		return PyDict_SetItemString(d, (char*)name, Py_None);
 	}
 	PyObject* v = PyTuple_New(6);
 	if (v == NULL) {
 		}
 	}
 	
-	if (PyDict_SetItemString(d, name, v) == -1) {
+	if (PyDict_SetItemString(d, (char*)name, v) == -1) {
 		Py_DECREF(v);
 		return -1;
 	}

pyobjc/Modules/objc/pyobjc.h

 #define PyDoc_STRVAR(name, str) PyDoc_VAR(name) = PyDoc_STR(str)
 #endif
 
-#define OBJC_VERSION "1.0rc2"
+#define OBJC_VERSION "1.0rc3"
 
 #ifdef MACOSX
 
 
 An overview of the relevant changes in new, and older, releases.
 
+Version 1.0rc3 (2003-09-14)
+---------------------------
+
+- 1.0rc2 didn't include the nibclassbuilder script
+
+- Fix bug in NSRectFillList
+
 Version 1.0rc2 (2003-09-10)
 ---------------------------
 
 			   ),
 	     packages = packages,
 	     package_dir = package_dir,
-	     #scripts = [ 'Scripts/nibclassbuilder', ],
+	     scripts = [ 'Scripts/nibclassbuilder', ],
 	     extra_path = "PyObjC",
              **SetupExtraArguments
 )
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 ProjectModifiedEvent.java.
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.