Changeset 411 for trunk/zoo-project


Ignore:
Timestamp:
Apr 9, 2013, 1:20:03 PM (12 years ago)
Author:
djay
Message:

Make sure that length of the map value is upper than 0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_internal_python.c

    r392 r411  
    585585    }else{
    586586      if(res!=NULL){
    587 #if PY_MAJOR_VERSION >= 3
    588         addToMap(res,_PyUnicode_AsString(key),_PyUnicode_AsString(value));
    589 #else
    590         addToMap(res,PyString_AsString(key),PyString_AsString(value));
     587        if(PyString_Size(value)>0)
     588#if PY_MAJOR_VERSION >= 3
     589          addToMap(res,_PyUnicode_AsString(key),_PyUnicode_AsString(value));
     590#else
     591          addToMap(res,PyString_AsString(key),PyString_AsString(value));
    591592#endif
    592593      }
    593594      else{
    594         res=
    595 #if PY_MAJOR_VERSION >= 3
    596           createMap(_PyUnicode_AsString(key),_PyUnicode_AsString(value));
    597 #else
    598           createMap(PyString_AsString(key),PyString_AsString(value));
     595        if(PyString_Size(value)>0)
     596          res=
     597#if PY_MAJOR_VERSION >= 3
     598            createMap(_PyUnicode_AsString(key),_PyUnicode_AsString(value));
     599#else
     600            createMap(PyString_AsString(key),PyString_AsString(value));
    599601#endif
    600602      }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png