Commits

Anonymous committed 43b9dee Merge

merge

Comments (0)

Files changed (6)

         depends=['lib/greenlet/greenlet.h', 'lib/greenlet/slp_platformselect.h'] + _find_platform_headers())
 
 ext_modules = [core, greenlet]
+
 """
 ext_modules = [core]
 

tobikko/core/buffer.c

     }else{
         buf->limit = LIMIT_MAX;
     }
-    DEBUG("new_buffer_t %p buf_size:%d", buf, buf->buf_size);
+    DEBUG("new_buffer_t %p buf_size:%d", buf, (int)buf->buf_size);
     return buf;
 }
 
         l = buf->buf_size - buf->len -1;
         ret = LIMIT_OVER;
     }
-    DEBUG("extend len:%d", l);
+    DEBUG("extend len:%d", (int)l);
     return ret;
 }
 
     }
     memcpy(buf->buf + buf->len, c , l);
     buf->len += (int)l;
-    DEBUG("write len:%d", l);
+    DEBUG("write len:%d", (int)l);
     return ret;
 }
 

tobikko/core/event.c

 static int
 EventObject_traverse(EventObject *self, visitproc visit, void *arg)
 {
-    DEBUG("self:%p cnt:%d", self, Py_REFCNT(self));
-    DEBUG("waiters:%d links:%d", PySet_GET_SIZE(self->waiters), PySet_GET_SIZE(self->links));
+    DEBUG("self:%p cnt:%d", self, (int)Py_REFCNT(self));
+    DEBUG("waiters:%d links:%d", (int)PySet_GET_SIZE(self->waiters), (int)PySet_GET_SIZE(self->links));
     Py_VISIT(self->links);
     Py_VISIT(self->waiters);
     Py_VISIT(self->notify_timer);

tobikko/core/gthread.c

     PyObject *n;
     int ret = 1;
 
-    DEBUG("self:%p result:%p:%d", self, result, Py_REFCNT(result));
+    DEBUG("self:%p result:%p:%d", self, result, (int)Py_REFCNT(result));
     Py_CLEAR(self->exc_info);
     self->result = result;
     if(!PySet_GET_SIZE(self->links)){
         ret = 0;
     }
     Py_DECREF(n);
-    DEBUG("self->result:%p;%d", self->result, Py_REFCNT(self->result));
+    DEBUG("self->result:%p;%d", self->result, (int)Py_REFCNT(self->result));
     return ret;
 }
 
 {
     int seconds = 0;
 
-    DEBUG("self:%p", self);
-    DEBUG("%d", Py_REFCNT(self));
+    DEBUG("self:%p ref:%d", self, (int)Py_REFCNT(self));
     if(!PyArg_ParseTuple(args, "i:start_later", &seconds)) {
         return NULL;
     }
 		return NULL;
     }
 
-    DEBUG("self:%p ref:%d block:%d timeout:%d", self, Py_REFCNT(self), block, timeout);
+    DEBUG("self:%p ref:%d block:%d timeout:%d", self, (int)Py_REFCNT(self), block, timeout);
     //check result;
     if(GreenThreadObject_ready(self)){
         if(self->result){
 
         //check result
 
-        DEBUG("fin get() self:%p ref:%d", self, Py_REFCNT(self));
+        DEBUG("fin get() self:%p ref:%d", self, (int)Py_REFCNT(self));
         if(GreenThreadObject_ready(self)){
             if(self->result){
                 Py_INCREF(self->result);
     PyGreenlet *current, *parent;
     TimerObject *timeout_timer = NULL;
 
-    DEBUG("self:%p ref:%d", self, Py_REFCNT(self));
+    DEBUG("self:%p ref:%d", self, (int)Py_REFCNT(self));
     //check result;
     if(GreenThreadObject_ready(self)){
         Py_RETURN_NONE;

tobikko/core/hub.c

     if(greenlet == NULL){
         return NULL;
     }
-    DEBUG("start thread:%p cnt:%d", greenlet, Py_REFCNT(greenlet));
+    DEBUG("start thread:%p cnt:%d", greenlet, (int)Py_REFCNT(greenlet));
     ret = greenlet_switch(greenlet, args, NULL);
     Py_DECREF(greenlet);
-    DEBUG("fin thread:%p ret:%p cnt:%d", greenlet, ret, Py_REFCNT(greenlet));
+    DEBUG("fin thread:%p ret:%p cnt:%d", greenlet, ret, (int)Py_REFCNT(greenlet));
     return ret;
 }
 
 
     DEBUG("self %p", self);
     size = PyTuple_GET_SIZE(args);
-    DEBUG("args size %d", size);
+    DEBUG("args size %d", (int)size);
 
     if(size < 2){
         PyErr_SetString(PyExc_TypeError, "schedule_call takes exactly 2 argument");
     memset(switch_arg, 0, sizeof(switch_arg_t));
     current = greenlet_getcurrent();
 
-    DEBUG("thread:%p cnt:%d", current, Py_REFCNT(current));
+    DEBUG("thread:%p cnt:%d", current, (int)Py_REFCNT(current));
     // switch to hub
     RDEBUG("add event loop:%p thread:%p fd:%d event:%d timeout:%d", hub->main_loop, current, fd, event, t);
     switch_arg->greenlet = current;

tobikko/core/socket.c

                 return -1;
             }
         }else{
-            DEBUG("end fd:%d send:%d", fd, r);
+            DEBUG("end fd:%d send:%d", fd, (int)r);
             return r;
         }
     }
                 return -1;
             }
         }else{
-            DEBUG("end fd:%d read:%d", fd, r);
+            DEBUG("end fd:%d read:%d", fd, (int)r);
             return r;
         }
     }
                 return -1;
             }
         }else{
-            DEBUG("read %d: addrlen:%d", r, addrlen);
+            DEBUG("read %d: addrlen:%d", (int)r, (int)addrlen);
             if(!(*addrobj = getaddrtuple(&addr, addrlen))){
                 return -1;
             }