Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 761415 | Differences between
and this patch

Collapse All | Expand All

(-)a/core/src/plugins/filed/python-fd.cc/python-fd.cc (-44 / +53 lines)
Lines 1051-1057 Link Here
1051
 */
1051
 */
1052
static inline bRC conv_python_retval(PyObject* pRetVal)
1052
static inline bRC conv_python_retval(PyObject* pRetVal)
1053
{
1053
{
1054
  return (bRC)PyInt_AsLong(pRetVal);
1054
  return (bRC)PyLong_AsLong(pRetVal);
1055
}
1055
}
1056
1056
1057
/**
1057
/**
Lines 1059-1065 Link Here
1059
 */
1059
 */
1060
static inline PyObject* conv_retval_python(bRC retval)
1060
static inline PyObject* conv_retval_python(bRC retval)
1061
{
1061
{
1062
  return (PyObject*)PyInt_FromLong((int)retval);
1062
  return (PyObject*)PyLong_FromLong((int)retval);
1063
}
1063
}
1064
1064
1065
/**
1065
/**
Lines 1088-1098 Link Here
1088
                            (char*)"OOO", type, value == NULL ? Py_None : value,
1088
                            (char*)"OOO", type, value == NULL ? Py_None : value,
1089
                            traceback == NULL ? Py_None : traceback);
1089
                            traceback == NULL ? Py_None : traceback);
1090
1090
1091
    emptyString = PyString_FromString("");
1091
    emptyString = PyUnicode_FromString("");
1092
    strRetval =
1092
    strRetval =
1093
        PyObject_CallMethod(emptyString, (char*)"join", (char*)"O", tbList);
1093
        PyObject_CallMethod(emptyString, (char*)"join", (char*)"O", tbList);
1094
1094
1095
    error_string = strdup(PyString_AsString(strRetval));
1095
    error_string = strdup(PyBytes_AsString(strRetval));
1096
1096
1097
    Py_DECREF(tbList);
1097
    Py_DECREF(tbList);
1098
    Py_DECREF(emptyString);
1098
    Py_DECREF(emptyString);
Lines 1125-1130 Link Here
1125
  struct plugin_ctx* p_ctx = (struct plugin_ctx*)ctx->pContext;
1125
  struct plugin_ctx* p_ctx = (struct plugin_ctx*)ctx->pContext;
1126
  PyObject *sysPath, *mPath, *pName, *pFunc;
1126
  PyObject *sysPath, *mPath, *pName, *pFunc;
1127
1127
1128
  static struct PyModuleDef cModPyDem =
1129
  {
1130
      PyModuleDef_HEAD_INIT,
1131
      "bareosfd", /* name of module */
1132
      "",          /* module documentation, may be NULL */
1133
      -1,          /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
1134
      BareosFDMethods
1135
   };
1136
1128
  /*
1137
  /*
1129
   * See if we already setup the python search path.
1138
   * See if we already setup the python search path.
1130
   */
1139
   */
Lines 1134-1140 Link Here
1134
     */
1143
     */
1135
    if (p_ctx->module_path) {
1144
    if (p_ctx->module_path) {
1136
      sysPath = PySys_GetObject((char*)"path");
1145
      sysPath = PySys_GetObject((char*)"path");
1137
      mPath = PyString_FromString(p_ctx->module_path);
1146
      mPath = PyUnicode_FromString(p_ctx->module_path);
1138
      PyList_Append(sysPath, mPath);
1147
      PyList_Append(sysPath, mPath);
1139
      Py_DECREF(mPath);
1148
      Py_DECREF(mPath);
1140
      p_ctx->python_path_set = true;
1149
      p_ctx->python_path_set = true;
Lines 1148-1154 Link Here
1148
    /*
1157
    /*
1149
     * Make our callback methods available for Python.
1158
     * Make our callback methods available for Python.
1150
     */
1159
     */
1151
    p_ctx->pInstance = Py_InitModule("bareosfd", BareosFDMethods);
1160
    p_ctx->pInstance = PyModule_Create(&cModPyDem);
1152
1161
1153
    /*
1162
    /*
1154
     * Fill in the slots of PyRestoreObject
1163
     * Fill in the slots of PyRestoreObject
Lines 1230-1236 Link Here
1230
  if (p_ctx->module_name) {
1239
  if (p_ctx->module_name) {
1231
    Dmsg(ctx, debuglevel, "python-fd: Trying to load module with name %s\n",
1240
    Dmsg(ctx, debuglevel, "python-fd: Trying to load module with name %s\n",
1232
         p_ctx->module_name);
1241
         p_ctx->module_name);
1233
    pName = PyString_FromString(p_ctx->module_name);
1242
    pName = PyUnicode_FromString(p_ctx->module_name);
1234
    p_ctx->pModule = PyImport_Import(pName);
1243
    p_ctx->pModule = PyImport_Import(pName);
1235
    Py_DECREF(pName);
1244
    Py_DECREF(pName);
1236
1245
Lines 1262-1268 Link Here
1262
    if (pFunc && PyCallable_Check(pFunc)) {
1271
    if (pFunc && PyCallable_Check(pFunc)) {
1263
      PyObject *pPluginDefinition, *pRetVal;
1272
      PyObject *pPluginDefinition, *pRetVal;
1264
1273
1265
      pPluginDefinition = PyString_FromString((char*)value);
1274
      pPluginDefinition = PyUnicode_FromString((char*)value);
1266
      if (!pPluginDefinition) { goto bail_out; }
1275
      if (!pPluginDefinition) { goto bail_out; }
1267
1276
1268
      pRetVal = PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext,
1277
      pRetVal = PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext,
Lines 1320-1326 Link Here
1320
  if (pFunc && PyCallable_Check(pFunc)) {
1329
  if (pFunc && PyCallable_Check(pFunc)) {
1321
    PyObject *pPluginDefinition, *pRetVal;
1330
    PyObject *pPluginDefinition, *pRetVal;
1322
1331
1323
    pPluginDefinition = PyString_FromString((char*)value);
1332
    pPluginDefinition = PyUnicode_FromString((char*)value);
1324
    if (!pPluginDefinition) { goto bail_out; }
1333
    if (!pPluginDefinition) { goto bail_out; }
1325
1334
1326
    pRetVal = PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext,
1335
    pRetVal = PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext,
Lines 1372-1378 Link Here
1372
  if (pFunc && PyCallable_Check(pFunc)) {
1381
  if (pFunc && PyCallable_Check(pFunc)) {
1373
    PyObject *pEventType, *pRetVal;
1382
    PyObject *pEventType, *pRetVal;
1374
1383
1375
    pEventType = PyInt_FromLong(event->eventType);
1384
    pEventType = PyLong_FromLong(event->eventType);
1376
1385
1377
    pRetVal =
1386
    pRetVal =
1378
        PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext, pEventType, NULL);
1387
        PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext, pEventType, NULL);
Lines 1447-1459 Link Here
1447
     * Initialize the Python SavePkt with the data we got passed in.
1456
     * Initialize the Python SavePkt with the data we got passed in.
1448
     */
1457
     */
1449
    if (sp->fname) {
1458
    if (sp->fname) {
1450
      pSavePkt->fname = PyString_FromString(sp->fname);
1459
      pSavePkt->fname = PyUnicode_FromString(sp->fname);
1451
    } else {
1460
    } else {
1452
      pSavePkt->fname = NULL;
1461
      pSavePkt->fname = NULL;
1453
    }
1462
    }
1454
1463
1455
    if (sp->link) {
1464
    if (sp->link) {
1456
      pSavePkt->link = PyString_FromString(sp->link);
1465
      pSavePkt->link = PyUnicode_FromString(sp->link);
1457
    } else {
1466
    } else {
1458
      pSavePkt->link = NULL;
1467
      pSavePkt->link = NULL;
1459
    }
1468
    }
Lines 1499-1507 Link Here
1499
       * As this has to linger as long as the backup is running we save it in
1508
       * As this has to linger as long as the backup is running we save it in
1500
       * our plugin context.
1509
       * our plugin context.
1501
       */
1510
       */
1502
      if (PyString_Check(pSavePkt->fname)) {
1511
      if (PyBytes_Check(pSavePkt->fname)) {
1503
        if (p_ctx->fname) { free(p_ctx->fname); }
1512
        if (p_ctx->fname) { free(p_ctx->fname); }
1504
        p_ctx->fname = strdup(PyString_AsString(pSavePkt->fname));
1513
        p_ctx->fname = strdup(PyBytes_AsString(pSavePkt->fname));
1505
        sp->fname = p_ctx->fname;
1514
        sp->fname = p_ctx->fname;
1506
      }
1515
      }
1507
    } else {
1516
    } else {
Lines 1516-1524 Link Here
1516
       * As this has to linger as long as the backup is running we save it in
1525
       * As this has to linger as long as the backup is running we save it in
1517
       * our plugin context.
1526
       * our plugin context.
1518
       */
1527
       */
1519
      if (PyString_Check(pSavePkt->link)) {
1528
      if (PyBytes_Check(pSavePkt->link)) {
1520
        if (p_ctx->link) { free(p_ctx->link); }
1529
        if (p_ctx->link) { free(p_ctx->link); }
1521
        p_ctx->link = strdup(PyString_AsString(pSavePkt->link));
1530
        p_ctx->link = strdup(PyBytes_AsString(pSavePkt->link));
1522
        sp->link = p_ctx->link;
1531
        sp->link = p_ctx->link;
1523
      }
1532
      }
1524
    }
1533
    }
Lines 1563-1574 Link Here
1563
         * our plugin context.
1572
         * our plugin context.
1564
         */
1573
         */
1565
        if (pSavePkt->object_name && pSavePkt->object &&
1574
        if (pSavePkt->object_name && pSavePkt->object &&
1566
            PyString_Check(pSavePkt->object_name) &&
1575
            PyBytes_Check(pSavePkt->object_name) &&
1567
            PyByteArray_Check(pSavePkt->object)) {
1576
            PyByteArray_Check(pSavePkt->object)) {
1568
          char* buf;
1577
          char* buf;
1569
1578
1570
          if (p_ctx->object_name) { free(p_ctx->object_name); }
1579
          if (p_ctx->object_name) { free(p_ctx->object_name); }
1571
          p_ctx->object_name = strdup(PyString_AsString(pSavePkt->object_name));
1580
          p_ctx->object_name = strdup(PyBytes_AsString(pSavePkt->object_name));
1572
          sp->object_name = p_ctx->object_name;
1581
          sp->object_name = p_ctx->object_name;
1573
1582
1574
          sp->object_len = pSavePkt->object_len;
1583
          sp->object_len = pSavePkt->object_len;
Lines 1852-1858 Link Here
1852
  if (pFunc && PyCallable_Check(pFunc)) {
1861
  if (pFunc && PyCallable_Check(pFunc)) {
1853
    PyObject *pCmd, *pRetVal;
1862
    PyObject *pCmd, *pRetVal;
1854
1863
1855
    pCmd = PyString_FromString(cmd);
1864
    pCmd = PyUnicode_FromString(cmd);
1856
    if (!pCmd) { goto bail_out; }
1865
    if (!pCmd) { goto bail_out; }
1857
1866
1858
    pRetVal = PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext, pCmd, NULL);
1867
    pRetVal = PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext, pCmd, NULL);
Lines 2064-2070 Link Here
2064
  if (pFunc && PyCallable_Check(pFunc)) {
2073
  if (pFunc && PyCallable_Check(pFunc)) {
2065
    PyObject *pFname, *pRetVal;
2074
    PyObject *pFname, *pRetVal;
2066
2075
2067
    pFname = PyString_FromString(fname);
2076
    pFname = PyUnicode_FromString(fname);
2068
    pRetVal =
2077
    pRetVal =
2069
        PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext, pFname, NULL);
2078
        PyObject_CallFunctionObjArgs(pFunc, p_ctx->bpContext, pFname, NULL);
2070
    Py_DECREF(pFname);
2079
    Py_DECREF(pFname);
Lines 2379-2385 Link Here
2379
      PyObject_New(PyRestoreObject, &PyRestoreObjectType);
2388
      PyObject_New(PyRestoreObject, &PyRestoreObjectType);
2380
2389
2381
  if (pRestoreObject) {
2390
  if (pRestoreObject) {
2382
    pRestoreObject->object_name = PyString_FromString(rop->object_name);
2391
    pRestoreObject->object_name = PyUnicode_FromString(rop->object_name);
2383
    pRestoreObject->object =
2392
    pRestoreObject->object =
2384
        PyByteArray_FromStringAndSize(rop->object, rop->object_len);
2393
        PyByteArray_FromStringAndSize(rop->object, rop->object_len);
2385
    pRestoreObject->plugin_name = rop->plugin_name;
2394
    pRestoreObject->plugin_name = rop->plugin_name;
Lines 2510-2516 Link Here
2510
      char* value = NULL;
2519
      char* value = NULL;
2511
2520
2512
      if (bfuncs->getBareosValue(ctx, (bVariable)var, &value) == bRC_OK) {
2521
      if (bfuncs->getBareosValue(ctx, (bVariable)var, &value) == bRC_OK) {
2513
        if (value) { pRetVal = PyString_FromString(value); }
2522
        if (value) { pRetVal = PyUnicode_FromString(value); }
2514
      }
2523
      }
2515
      break;
2524
      break;
2516
    }
2525
    }
Lines 2525-2531 Link Here
2525
2534
2526
      ctx = PyGetbpContext(pyCtx);
2535
      ctx = PyGetbpContext(pyCtx);
2527
      if (bfuncs->getBareosValue(ctx, (bVariable)var, &value) == bRC_OK) {
2536
      if (bfuncs->getBareosValue(ctx, (bVariable)var, &value) == bRC_OK) {
2528
        pRetVal = PyInt_FromLong(value);
2537
        pRetVal = PyLong_FromLong(value);
2529
      }
2538
      }
2530
      break;
2539
      break;
2531
    }
2540
    }
Lines 2538-2544 Link Here
2538
2547
2539
      ctx = PyGetbpContext(pyCtx);
2548
      ctx = PyGetbpContext(pyCtx);
2540
      if (bfuncs->getBareosValue(ctx, (bVariable)var, &value) == bRC_OK) {
2549
      if (bfuncs->getBareosValue(ctx, (bVariable)var, &value) == bRC_OK) {
2541
        if (value) { pRetVal = PyString_FromString(value); }
2550
        if (value) { pRetVal = PyUnicode_FromString(value); }
2542
      }
2551
      }
2543
      break;
2552
      break;
2544
    }
2553
    }
Lines 2578-2584 Link Here
2578
    case bVarLevel: {
2587
    case bVarLevel: {
2579
      int value = 0;
2588
      int value = 0;
2580
2589
2581
      value = PyInt_AsLong(pyValue);
2590
      value = PyLong_AsLong(pyValue);
2582
      if (value) {
2591
      if (value) {
2583
        retval = bfuncs->setBareosValue(ctx, (bVariable)var, &value);
2592
        retval = bfuncs->setBareosValue(ctx, (bVariable)var, &value);
2584
      }
2593
      }
Lines 2587-2593 Link Here
2587
    case bVarFileSeen: {
2596
    case bVarFileSeen: {
2588
      char* value;
2597
      char* value;
2589
2598
2590
      value = PyString_AsString(pyValue);
2599
      value = PyBytes_AsString(pyValue);
2591
      if (value) {
2600
      if (value) {
2592
        retval = bfuncs->setBareosValue(ctx, (bVariable)var, value);
2601
        retval = bfuncs->setBareosValue(ctx, (bVariable)var, value);
2593
      }
2602
      }
Lines 2680-2686 Link Here
2680
  ctx = PyGetbpContext(pyCtx);
2689
  ctx = PyGetbpContext(pyCtx);
2681
  for (int i = 0; i < len; i++) {
2690
  for (int i = 0; i < len; i++) {
2682
    pyEvent = PySequence_Fast_GET_ITEM(pySeq, i);
2691
    pyEvent = PySequence_Fast_GET_ITEM(pySeq, i);
2683
    event = PyInt_AsLong(pyEvent);
2692
    event = PyLong_AsLong(pyEvent);
2684
2693
2685
    if (event >= bEventJobStart && event <= FD_NR_EVENTS) {
2694
    if (event >= bEventJobStart && event <= FD_NR_EVENTS) {
2686
      Dmsg(ctx, debuglevel,
2695
      Dmsg(ctx, debuglevel,
Lines 2721-2727 Link Here
2721
  ctx = PyGetbpContext(pyCtx);
2730
  ctx = PyGetbpContext(pyCtx);
2722
  for (int i = 0; i < len; i++) {
2731
  for (int i = 0; i < len; i++) {
2723
    pyEvent = PySequence_Fast_GET_ITEM(pySeq, i);
2732
    pyEvent = PySequence_Fast_GET_ITEM(pySeq, i);
2724
    event = PyInt_AsLong(pyEvent);
2733
    event = PyLong_AsLong(pyEvent);
2725
2734
2726
    if (event >= bEventJobStart && event <= FD_NR_EVENTS) {
2735
    if (event >= bEventJobStart && event <= FD_NR_EVENTS) {
2727
      Dmsg(ctx, debuglevel,
2736
      Dmsg(ctx, debuglevel,
Lines 2754-2760 Link Here
2754
2763
2755
  ctx = PyGetbpContext(pyCtx);
2764
  ctx = PyGetbpContext(pyCtx);
2756
  if (bfuncs->getInstanceCount(ctx, &value) == bRC_OK) {
2765
  if (bfuncs->getInstanceCount(ctx, &value) == bRC_OK) {
2757
    pRetVal = PyInt_FromLong(value);
2766
    pRetVal = PyLong_FromLong(value);
2758
  }
2767
  }
2759
2768
2760
  if (!pRetVal) {
2769
  if (!pRetVal) {
Lines 2971-2978 Link Here
2971
   */
2980
   */
2972
  sp.type = pSavePkt->type;
2981
  sp.type = pSavePkt->type;
2973
  if (pSavePkt->fname) {
2982
  if (pSavePkt->fname) {
2974
    if (PyString_Check(pSavePkt->fname)) {
2983
    if (PyBytes_Check(pSavePkt->fname)) {
2975
      sp.fname = PyString_AsString(pSavePkt->fname);
2984
      sp.fname = PyBytes_AsString(pSavePkt->fname);
2976
    } else {
2985
    } else {
2977
      goto bail_out;
2986
      goto bail_out;
2978
    }
2987
    }
Lines 2980-2987 Link Here
2980
    goto bail_out;
2989
    goto bail_out;
2981
  }
2990
  }
2982
  if (pSavePkt->link) {
2991
  if (pSavePkt->link) {
2983
    if (PyString_Check(pSavePkt->link)) {
2992
    if (PyBytes_Check(pSavePkt->link)) {
2984
      sp.link = PyString_AsString(pSavePkt->link);
2993
      sp.link = PyBytes_AsString(pSavePkt->link);
2985
    } else {
2994
    } else {
2986
      goto bail_out;
2995
      goto bail_out;
2987
    }
2996
    }
Lines 3024-3031 Link Here
3024
   * that here separately and don't call PySavePacketToNative().
3033
   * that here separately and don't call PySavePacketToNative().
3025
   */
3034
   */
3026
  if (pSavePkt->fname) {
3035
  if (pSavePkt->fname) {
3027
    if (PyString_Check(pSavePkt->fname)) {
3036
    if (PyBytes_Check(pSavePkt->fname)) {
3028
      sp.fname = PyString_AsString(pSavePkt->fname);
3037
      sp.fname = PyBytes_AsString(pSavePkt->fname);
3029
    } else {
3038
    } else {
3030
      goto bail_out;
3039
      goto bail_out;
3031
    }
3040
    }
Lines 3100-3108 Link Here
3100
 */
3109
 */
3101
static inline char* PyGetStringValue(PyObject* object)
3110
static inline char* PyGetStringValue(PyObject* object)
3102
{
3111
{
3103
  if (!object || !PyString_Check(object)) { return (char*)""; }
3112
  if (!object || !PyBytes_Check(object)) { return (char*)""; }
3104
3113
3105
  return PyString_AsString(object);
3114
  return PyBytes_AsString(object);
3106
}
3115
}
3107
3116
3108
static inline char* PyGetByteArrayValue(PyObject* object)
3117
static inline char* PyGetByteArrayValue(PyObject* object)
Lines 3132-3138 Link Here
3132
       self->plugin_name, self->object_type, self->object_len,
3141
       self->plugin_name, self->object_type, self->object_len,
3133
       self->object_full_len, self->object_index, self->object_compression,
3142
       self->object_full_len, self->object_index, self->object_compression,
3134
       self->stream, self->JobId);
3143
       self->stream, self->JobId);
3135
  s = PyString_FromString(buf.c_str());
3144
  s = PyUnicode_FromString(buf.c_str());
3136
3145
3137
  return s;
3146
  return s;
3138
}
3147
}
Lines 3208-3214 Link Here
3208
       self->gid, self->rdev, self->size, self->atime, self->mtime, self->ctime,
3217
       self->gid, self->rdev, self->size, self->atime, self->mtime, self->ctime,
3209
       self->blksize, self->blocks);
3218
       self->blksize, self->blocks);
3210
3219
3211
  s = PyString_FromString(buf.c_str());
3220
  s = PyUnicode_FromString(buf.c_str());
3212
3221
3213
  return s;
3222
  return s;
3214
}
3223
}
Lines 3308-3314 Link Here
3308
       PyGetStringValue(self->object_name), PyGetByteArrayValue(self->object),
3317
       PyGetStringValue(self->object_name), PyGetByteArrayValue(self->object),
3309
       self->object_len, self->object_index);
3318
       self->object_len, self->object_index);
3310
3319
3311
  s = PyString_FromString(buf.c_str());
3320
  s = PyUnicode_FromString(buf.c_str());
3312
3321
3313
  return s;
3322
  return s;
3314
}
3323
}
Lines 3388-3394 Link Here
3388
       self->ofname, self->olname, self->where, self->RegexWhere, self->replace,
3397
       self->ofname, self->olname, self->where, self->RegexWhere, self->replace,
3389
       self->create_status);
3398
       self->create_status);
3390
3399
3391
  s = PyString_FromString(buf.c_str());
3400
  s = PyUnicode_FromString(buf.c_str());
3392
  Py_DECREF(stat_repr);
3401
  Py_DECREF(stat_repr);
3393
3402
3394
  return s;
3403
  return s;
Lines 3462-3468 Link Here
3462
       self->func, self->count, self->flags, (self->mode & ~S_IFMT),
3471
       self->func, self->count, self->flags, (self->mode & ~S_IFMT),
3463
       PyGetByteArrayValue(self->buf), self->fname, self->status,
3472
       PyGetByteArrayValue(self->buf), self->fname, self->status,
3464
       self->io_errno, self->lerror, self->whence, self->offset, self->win32);
3473
       self->io_errno, self->lerror, self->whence, self->offset, self->win32);
3465
  s = PyString_FromString(buf.c_str());
3474
  s = PyUnicode_FromString(buf.c_str());
3466
3475
3467
  return s;
3476
  return s;
3468
}
3477
}
Lines 3533-3539 Link Here
3533
3542
3534
  Mmsg(buf, "AclPacket(fname=\"%s\", content=\"%s\")", self->fname,
3543
  Mmsg(buf, "AclPacket(fname=\"%s\", content=\"%s\")", self->fname,
3535
       PyGetByteArrayValue(self->content));
3544
       PyGetByteArrayValue(self->content));
3536
  s = PyString_FromString(buf.c_str());
3545
  s = PyUnicode_FromString(buf.c_str());
3537
3546
3538
  return s;
3547
  return s;
3539
}
3548
}
Lines 3579-3585 Link Here
3579
3588
3580
  Mmsg(buf, "XattrPacket(fname=\"%s\", name=\"%s\", value=\"%s\")", self->fname,
3589
  Mmsg(buf, "XattrPacket(fname=\"%s\", name=\"%s\", value=\"%s\")", self->fname,
3581
       PyGetByteArrayValue(self->name), PyGetByteArrayValue(self->value));
3590
       PyGetByteArrayValue(self->name), PyGetByteArrayValue(self->value));
3582
  s = PyString_FromString(buf.c_str());
3591
  s = PyUnicode_FromString(buf.c_str());
3583
3592
3584
  return s;
3593
  return s;
3585
}
3594
}

Return to bug 761415