Changeset 570 for trunk/python


Ignore:
Timestamp:
Jan 23, 2007, 10:49:32 PM (18 years ago)
Author:
dkearney
Message:

removed make metric function from python code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/Rappture/PyRpUnits.cc

    r508 r570  
    394394}
    395395
    396 PyDoc_STRVAR(RpUnits_makeMetric_doc,
    397 "makeMetric (newBasis) -> PyInt \n\
    398 \n\
    399 Create the metric extentions and conversion functions for \n\
    400 the unit 'newBasis', thus making it a new basis.");
    401 
    402 static PyObject*
    403 RpUnits_makeMetric(PyObject *self, PyObject *args)
    404 {
    405     RpUnitsObject* units = NULL;
    406     int result = 0;
    407 
    408     if (PyTuple_Size(args) > 0) {
    409         PyArg_ParseTuple(args, "O!", &RpUnitsObjectType, &units);
    410     }
    411     else {
    412         return NULL;
    413     }
    414 
    415     if (units->rp_unit) {
    416         result = RpUnits::makeMetric(units->rp_unit);
    417     }
    418 
    419     return PyInt_FromLong((long)result);
    420 }
    421 
    422396PyDoc_STRVAR(RpUnits_convert_doc,
    423397"convert (fromVal, to, units) -> PyString \n\
     
    518492        RpUnits_find_doc},
    519493
    520     {"makeMetric", RpUnits_makeMetric, METH_VARARGS,
    521         RpUnits_makeMetric_doc},
    522 
    523494    {"convert", (PyCFunction)RpUnits_convert, METH_VARARGS|METH_KEYWORDS,
    524495        RpUnits_convert_doc},
Note: See TracChangeset for help on using the changeset viewer.