~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/blender/python/api2_2x/Ipocurve.c

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2007-05-17 11:47:59 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070517114759-yp4ybrnhp2u7pk66
Tags: 2.44-1
* New upstream release.
* Drop debian/patches/01_64bits_stupidity, not needed anymore: as of this
  version blender is 64 bits safe again. Adjust README.Debian accordingly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: Ipocurve.c,v 1.39 2007/01/13 04:53:40 campbellbarton Exp $
 
2
 * $Id: Ipocurve.c,v 1.42 2007/04/05 04:34:41 khughes Exp $
3
3
 *
4
4
 * ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
5
5
 *
192
192
/*****************************************************************************/
193
193
static int IpoCurve_compare( C_IpoCurve * a, C_IpoCurve * b );
194
194
static PyObject *IpoCurve_repr( C_IpoCurve * self );
195
 
static void IpoCurve_dealloc( C_IpoCurve * self );
196
195
 
197
196
/*****************************************************************************/
198
197
/* Python IpoCurve_Type structure definition:                                */
204
203
        sizeof( C_IpoCurve ),                           /* tp_basicsize */
205
204
        0,                                                                      /* tp_itemsize */
206
205
        /* methods */
207
 
        ( destructor ) IpoCurve_dealloc,    /* tp_dealloc */
 
206
        NULL,                                                       /* tp_dealloc */
208
207
        0,                                                                      /* tp_print */
209
208
        ( getattrfunc ) NULL,               /* tp_getattr */
210
209
        ( setattrfunc ) NULL,               /* tp_setattr */
534
533
                                "expected tuple of floats" );
535
534
 
536
535
                x = (float)PyFloat_AsDouble( xobj );
 
536
                Py_DECREF( xobj );
537
537
                y = (float)PyFloat_AsDouble( yobj );
 
538
                Py_DECREF( yobj );
538
539
                insert_vert_ipo( icu, x, y);
539
540
        }
540
541
 
652
653
}
653
654
 
654
655
/*****************************************************************************/
655
 
/* Function:    Ipo_dealloc                                                  */
656
 
/* Description: This is a callback function for the C_IpoCurve type. It is   */
657
 
/*              the destructor function.                                     */
658
 
/*****************************************************************************/
659
 
 
660
 
static void IpoCurve_dealloc( C_IpoCurve * self )
661
 
{
662
 
        PyObject_DEL( self );
663
 
}
664
 
 
665
 
/*****************************************************************************/
666
656
/* Function:    IpoCurve_compare                                                 */
667
657
/* Description: This compares 2 python types, == or != only.                         */
668
658
/*****************************************************************************/
705
695
}
706
696
 
707
697
/*****************************************************************************/
708
 
/* Function:    IpoCurve_CheckPyObject                                      */
709
 
/* Description: This function returns true when the given PyObject is of the */
710
 
/*              type IpoCurve. Otherwise it will return false.               */
711
 
/*****************************************************************************/
712
 
int IpoCurve_CheckPyObject( PyObject * pyobj )
713
 
{
714
 
        return ( pyobj->ob_type == &IpoCurve_Type );
715
 
}
716
 
 
717
 
/*****************************************************************************/
718
698
/* Function:    IpoCurve_FromPyObject                                       */
719
699
/* Description: This function returns the Blender ipo from the given         */
720
700
/*              PyObject.                                                    */