src/thread/pth/SDL_systhread.c
changeset 321 af42e7c4c860
parent 297 f6ffac90895c
child 329 1d74ddc90cb2
--- a/src/thread/pth/SDL_systhread.c	Thu Mar 28 16:20:10 2002 +0000
+++ b/src/thread/pth/SDL_systhread.c	Sat Mar 30 18:53:23 2002 +0000
@@ -51,15 +51,17 @@
 {
 	pth_attr_t type;
 
+	type = pth_attr_new();
+
 	/* Set the thread attributes */
-	if ( pth_attr_init(&type) != 0 ) {
+	if ( pth_attr_init(type) != 0 ) {
 		SDL_SetError("Couldn't initialize pth attributes");
 		return(-1);
 	}
-	pth_attr_set(&type, PTH_ATTR_JOINABLE, TRUE);
+	pth_attr_set(type, PTH_ATTR_JOINABLE, TRUE);
 
 	/* Create the thread and go! */
-	if ( pth_spawn( &type, RunThread, args) != 0 ) {
+	if ( pth_spawn(type, RunThread, args) != 0 ) {
 		SDL_SetError("Not enough resources to create thread");
 		return(-1);
 	}