Mercurial > hg > xemacs-beta
annotate src/blocktype.h @ 5753:dbd8305e13cb
Warn about non-string non-integer ARG to #'gensym, bytecomp.el.
lisp/ChangeLog addition:
2013-08-21 Aidan Kehoe <kehoea@parhasard.net>
* bytecomp.el:
* bytecomp.el (gensym):
* bytecomp.el (byte-compile-gensym): New.
Warn that gensym called in a for-effect context is unlikely to be
useful.
Warn about non-string non-integer ARGs, this is incorrect.
Am not changing the function to error with same, most code that
makes the mistake is has no problems, which is why it has survived
so long.
* window-xemacs.el (save-window-excursion/mapping):
* window.el (save-window-excursion):
Call #'gensym with a string, not a symbol.
| author | Aidan Kehoe <kehoea@parhasard.net> |
|---|---|
| date | Wed, 21 Aug 2013 19:02:59 +0100 |
| parents | 308d34e9f07d |
| children |
| rev | line source |
|---|---|
| 428 | 1 /* Fixed-size block allocator -- include file. |
| 2 Copyright (C) 1994 Free Software Foundation, Inc. | |
| 3 | |
| 4 This file is part of XEmacs. | |
| 5 | |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
665
diff
changeset
|
6 XEmacs is free software: you can redistribute it and/or modify it |
| 428 | 7 under the terms of the GNU General Public License as published by the |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
665
diff
changeset
|
8 Free Software Foundation, either version 3 of the License, or (at your |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
665
diff
changeset
|
9 option) any later version. |
| 428 | 10 |
| 11 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
| 12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 14 for more details. | |
| 15 | |
| 16 You should have received a copy of the GNU General Public License | |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
665
diff
changeset
|
17 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 428 | 18 |
| 19 /* Synched up with: Not in FSF. */ | |
| 20 | |
| 21 /* Authorship: | |
| 22 | |
| 23 Ben Wing: December 1994, for 19.12. | |
| 24 */ | |
| 25 | |
| 440 | 26 #ifndef INCLUDED_blocktype_h_ |
| 27 #define INCLUDED_blocktype_h_ | |
| 428 | 28 |
| 29 #define Blocktype_declare(type) \ | |
| 30 type *free; \ | |
| 665 | 31 Bytecount elsize; \ |
| 428 | 32 type *tempel |
| 33 | |
| 665 | 34 void *Blocktype_newf (Bytecount elsize); |
| 428 | 35 void Blocktype_allocf (void *b); |
| 36 void Blocktype_free (void *bbb, void *el); | |
| 37 | |
| 38 #define Blocktype_new(structype) \ | |
| 39 (structype *) Blocktype_newf (sizeof(*(((structype *) NULL)->free))) | |
| 40 #define Blocktype_alloc(b) (Blocktype_allocf (b), (b)->tempel) | |
| 41 | |
| 440 | 42 #endif /* INCLUDED_blocktype_h_ */ |
