Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:53:58+00:00 2026-06-16T02:53:58+00:00

Possible Duplicate: Why does glib redefine types? In the GTK+ 2.0 tutorial, I can

  • 0

Possible Duplicate:
Why does glib redefine types?

In the GTK+ 2.0 tutorial, I can read here the following statement about data types:

There are a few things you probably noticed in the previous examples that need explaining. The gint, gchar, etc. that you see are typedefs to int and char, respectively, that are part of the GLib system. This is done to get around that nasty dependency on the size of simple data types when doing calculations.

I don’t understand the last part of this explanation. Why is it better to use Glib data types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:53:59+00:00Added an answer on June 16, 2026 at 2:53 am

    As the tutorial mentions, it’s to ensure portability. When building code that uses glib on a new system you’d only have to modify the header file with the typedefs, not the code that uses those types.

    The C99 standard added fixed-width types (int8_t, uint32_t, etc) which would make the glib types obsolete, but glib predates the C99 standard which probably is the reason why it has its own set of types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Does SQL Server 2005 have an equivalent to MySql’s ENUM data type?
Possible Duplicate: What does void(U::*)(void) mean? Considering the following: template <class T> class myButtoncb
Possible Duplicate: Does C# have extension properties? I have the following: public static class
Possible Duplicate: Does VB6 short-circuit complex conditions? I am curious about how IF statements
Possible Duplicate: Does a finally block always run? let's imagine the following scenario: public
Possible Duplicate: Does reading from stdin flush stdout? C++ Standard guarantees that all data
Possible Duplicate: Does every Core Data Relationship have to have an Inverse? I am
Possible Duplicate: Does python have a package/module management system? In ruby I can do
Possible Duplicate: Does lastObject in NSMutableArray return a copy of the object? I'm following
Possible Duplicate: Does Objective-C guarantee the initialization of interface member data? When I declare

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.