Convention for C functions success/failure

Discussion in 'Python' started by spam.noam@gmail.com, Dec 3, 2005.

  1. Guest

    Hello,

    What is the convention for writing C functions which don't return a
    value, but can fail?

    If I understand correctly,
    1. PyArg_ParseTuple returns 0 on failure and 1 on success.
    2. PySet_Add returns -1 on failure and 0 on success.

    Am I correct? What should I do with new C functions that I write?

    Thanks,
    Noam
    , Dec 3, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    351
  2. tiewknvc9
    Replies:
    3
    Views:
    840
    Andrew Thompson
    Nov 15, 2006
  3. Andy B
    Replies:
    0
    Views:
    315
    Andy B
    Dec 24, 2007
  4. Replies:
    0
    Views:
    457
  5. Replies:
    2
    Views:
    339
Loading...

Share This Page