Hello,
In the past there was a csize_t which I used in the imagemagick headers, but now it seams to have disappeared. Is size_t compatible with the c type? Or else any other compatible type to use?
thanks,

Mailing lists / fpc-devel / 2009-10
10 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello,
In the past there was a csize_t which I used in the imagemagick headers, but now it seams to have disappeared. Is size_t compatible with the c type? Or else any other compatible type to use?
thanks,
Well, there is still is:
http://lazarus-ccr.sourceforge.net/fpcdoc/rtl/ctypes/csize_t.html
I think the description is a bit strange: "Character size type". I wouldhave guess the c was not because of Character, but because of the C language.
Vincent
Vincent Snijders wroteWell, there is still is: http://lazarus-ccr.sourceforge.net/fpcdoc/rtl/ctypes/csize_t.html
The docs could be out-dated, csize_t doesn't compile in FPC 2.2.4
I think the description is a bit strange: "Character size type". I wouldhave guess the c was not because of Character, but because of the C language.
The descriptions is completely wrong.
Ah, it's the oposite, sorry, csize_t was *added* and someone updated the imagemagick headers ...
I was testing the svn imagemagick headers with the stable compiler ... ok, problem solved.
thanks for the help Vincent,
On Wed, Oct 28, 2009 at 4:51 PM, Vincent Snijders The docs could be out-dated, csize_t…
Or maybe too new. Try to compile with 2.5.1 or 2.3.1.
Michael, do you need a bug report?
Vincent
2009/10/28 Vincent Snijders :
Originally Posted by google
`size_t' is a type suitable for representing the amount of memory a data object requires, expressed in units of `char'. It is an integer type (C cannot keep track of fractions of a `char'), and it is unsigned (negative sizes make no sense). It is the type of the result of the `sizeof' operator. It is the type you pass to malloc() and friends to say how much memory you want. It is the type returned by strlen() to say how many "significant" characters are in a string
The more detailed answer is here:
http://bytes.com/forum/thread220206.html
On Wed, Oct 28, 2009 at 4:51 PM, Vincent Snijders The docs could be out-dated, csize_t…
Please post a bugreport.
Michael.
Michael Van Canneyt wrote> > The descriptions is completely wrong. Please post a bugreport.
Done:
http://bugs.freepascal.org/view.php?id=14932
Vincnet
Thank you, Vincnet :-)
Michael.
In the past there was a csize_t which I used in the imagemagick headers, but now it seams…
Some time ago I noticed that a lot of packages are defining their own size_t type. So I added csize_t to ctypes and removed all individual definitions from the packages so that all are using csize_t.
But this changes are quit old, so I wounder why these aren't in 2.2.4
from svn log
------------------------------------------------------------------------ r12602 | ivost | 2009-01-26 13:58:20 +0100 (Mon, 26. Jan 2009) | 4 Zeilen
* added csize_t and pcsize_t for non unix systems (in unix/ctypes.pp)
* added csize_t = UnixTypes.size_t in ctypes.pp for unix systems.
* reason: size_t is a C type and it's often used by C header files. Several packages define their own size_t.
------------------------------------------------------------------------ r12603 | ivost | 2009-01-26 14:01:03 +0100 (Mon, 26. Jan 2009) | 2 Zeilen
* removed the usage of unixtypes from imagemagick headers. Type size_t was used. csize_t is now available for all platforms over ctypes.
-Ivo Steinmann