- Previous thread: Xcb - Where do I find the xcb_keysym_t and modifier value constants?
- Next thread: Xcb - XDefineCursor equivalent?
- Threads sorted by date: xorg-xcb 201003
On Mon, Mar 22, 2010 at 8:19 AM, Arnaud Fontaine wrote:
I see you've used variable length arrays. A few points spring to mind:
- Variable-length arrays are C99. The Microsoft C compilers still
don't support most of C99.
- Variable-length arrays are merely a portable way to spell "alloca".
The server folks have just recently (2007) removed all allocas from
the server. There is no portable way to determine the amount of stack
space available, and alloca rarely returns NULL (and variable-length
arrays can't). This matters less in a client side library, since you
can only DoS yourself.
- Making an extra copy is no fun. XCB uses iovecs to try to avoid
extra copies. You'd have to open-code ChangeProperty to use an iovec,
though, which is ugly. Thoughts?
My comments above are just things I thought of, and not deep
complaints. Feel free to commit if nobody else objects.
Peter Harris
I see you've used variable length arrays. A few points spring to mind:
- Variable-length arrays are C99. The Microsoft C compilers still
don't support most of C99.
- Variable-length arrays are merely a portable way to spell "alloca".
The server folks have just recently (2007) removed all allocas from
the server. There is no portable way to determine the amount of stack
space available, and alloca rarely returns NULL (and variable-length
arrays can't). This matters less in a client side library, since you
can only DoS yourself.
- Making an extra copy is no fun. XCB uses iovecs to try to avoid
extra copies. You'd have to open-code ChangeProperty to use an iovec,
though, which is ugly. Thoughts?
My comments above are just things I thought of, and not deep
complaints. Feel free to commit if nobody else objects.
Peter Harris
Conversations: Xcb - Setting the WM_TRANSIENT_FOR property on a window
- Xcb - Setting the WM_TRANSIENT_FOR property on a window by Nicholas Allen on 2010-03-21T21:02:44+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Peter Harris on 2010-03-21T21:34:27+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-22T12:19:30+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Peter Harris on 2010-03-22T13:05:18+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-22T13:25:06+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Mikhail Gusarov on 2010-03-22T13:28:25+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Peter Harris on 2010-03-22T13:43:28+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-22T15:16:27+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Julien Cristau on 2010-03-22T15:21:38+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Peter Harris on 2010-03-22T15:26:49+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-22T15:40:09+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Peter Harris on 2010-03-22T18:06:53+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-23T13:20:03+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-23T13:24:24+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-23T13:25:38+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Peter Harris on 2010-03-24T16:08:06+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-24T16:29:40+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Carsten Meier on 2010-03-24T16:22:49+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Carsten Meier on 2010-03-24T16:37:11+00:00
- Re: Xcb - Setting the WM_TRANSIENT_FOR property on a window by Arnaud Fontaine on 2010-03-24T19:44:15+00:00
Related Threads
- Creating a POI Word97 header in an utterly blank file. - poi-user
- jmeter-server and already busy 1099 - jakarta-jmeter-user
- make bootstrap gives errors... - gnu-help-emacs
- OWL - w3c-semantic-web
- Bug#595397: libsys-sigaction-perl: FTBFS on armel, unsupported - debian-arm
- Inkscape-devel - comma bug - inkscape-devel
- Inkscape-devel - Text Dialog Not Grabbing Font, Style, Size - inkscape-devel
- GIT PULL REQUEST - IR updates for 2.6.36 - linux-media
- PATCH 0/6 - tcm: Add TFO->new_cmd_map() and TFO->task_sg_chaining=1 - linux-scsi
- FFmpeg-devel - safety checks in get_*bits - mplayer-ffmpeg-devel
Related Lists
- centos-devel
- centos-docs
- centos-general
- centos-virt
- curl-library
- curl-users
- emc-developers
- emc-users
- gentoo-amd64
- gentoo-desktop
- gentoo-dev
- gentoo-user
- haskell-beginners
- haskell-cafe
- haskell-general
- libssh2-devel
- lua
- microformats-discuss
- openmoko
- openvz-users
- red5
- rockbox-dev
- ruby-talk
- trac-dev
- trac-users
- veritas-bu
- vim-dev
- vim-mac
- vim-use
- webkit-dev
- webkit-help
- wine-devel
- wine-users
- wxwidgets-dev
- wxwidgets-users
- xfce
- xmleditor-support
- xorg-devel
- xorg-driver-ati
- xorg-general
- xorg-xcb
- xorg-xdg