NULL handling

Discussion in 'C Programming' started by stephanearnold@yahoo.fr, Oct 25, 2007.

  1. Guest

    Hello,

    While writing an interpreter in C, I have thought of a suggestion for
    some new keywords that would help to reduce C application complexity:

    - nullable
    - notnullable

    I have a bunch of sept_get_XXX functions that return a pointer to a
    struct, namely sept_Type*.
    I have defined 'nullable' and 'notnullable' as empty macros in the
    main .H file.

    Now I defined my functions prototypes as follows:

    inline notnullable sept_get_dict(void);
    inline notnullable sept_get_list(void);

    And I think I will use these macros in my source tree even for
    function arguments, like this:

    int my_func(nullable sept_Foo* foo, notnullable gchar* msg);

    Why doesn't exist such a functionality in standard C/ or in specific
    compilers?
    Has my idea a chance to live, or is there no way to create such
    keywords?
    By the way, I have noticed they tend to make my source code difficult
    to read,
    but I will strive and continue to use it until I find a better way to
    handle such informations.

    Regards,
    St├ęphane A.
     
    , Oct 25, 2007
    #1
    1. Advertising

  2. santosh Guest

    wrote:

    <repeat post snipped>

    What was wrong with the responses to your first post of this question?
     
    santosh, Oct 25, 2007
    #2
    1. Advertising

  3. CBFalconer Guest

    santosh wrote:
    > wrote:
    >
    > <repeat post snipped>
    >
    > What was wrong with the responses to your first post of this
    > question?


    As seen here there was only one, accompanied by two more from
    plonkees that were never allowed on my system. :)

    Of course this still doesn't excuse the impatient re-entry.

    --
    Chuck F (cbfalconer at maineline dot net)
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net>



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    CBFalconer, Oct 25, 2007
    #3
    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. Kivak Wolf
    Replies:
    2
    Views:
    10,094
    Kivak Wolf
    Jun 28, 2005
  2. vizlab
    Replies:
    3
    Views:
    4,233
    Michael Bar-Sinai
    Oct 17, 2007
  3. Replies:
    16
    Views:
    7,368
    Mike Schilling
    Oct 12, 2005
  4. Replies:
    5
    Views:
    26,898
    Mike Schilling
    Mar 29, 2006
  5. Bo Peng
    Replies:
    13
    Views:
    13,363
    Siemel Naran
    Jul 18, 2004
Loading...

Share This Page