1996-03-22 00:37:53 +00:00
|
|
|
/* Callbacks for `int' (and smaller) things. */
|
|
|
|
/* Copyright (C) 1996 Free Software Foundation, Inc. */
|
|
|
|
|
|
|
|
/* Author: Albin L. Jones <Albin.L.Jones@Dartmouth.EDU>
|
|
|
|
* Created: Sat Feb 10 15:55:51 EST 1996
|
|
|
|
* Updated: Mon Mar 11 00:23:10 EST 1996
|
|
|
|
* Serial: 96.03.11.01
|
|
|
|
*
|
1996-05-12 00:56:10 +00:00
|
|
|
* This file is part of the GNUstep Base Library.
|
1996-03-22 00:37:53 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the Free
|
1999-09-09 02:56:20 +00:00
|
|
|
* Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
1996-03-22 00:37:53 +00:00
|
|
|
|
|
|
|
/**** Included Headers *******************************************************/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <Foundation/NSString.h>
|
1998-12-20 21:27:47 +00:00
|
|
|
#include <base/o_cbs.h>
|
1996-03-22 00:37:53 +00:00
|
|
|
|
|
|
|
/**** Function Implementations ***********************************************/
|
|
|
|
|
|
|
|
/* FIXME: We (like OpenStep) make the big assumption here that
|
|
|
|
* 'sizeof(int) <= sizeof(void *)'....This is probably not a good thing,
|
|
|
|
* but what can I do? */
|
|
|
|
|
|
|
|
size_t
|
1996-04-17 19:26:04 +00:00
|
|
|
o_int_hash(int i)
|
1996-03-22 00:37:53 +00:00
|
|
|
{
|
|
|
|
return (size_t)i;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-17 19:26:04 +00:00
|
|
|
o_int_compare(int i, int j)
|
1996-03-22 00:37:53 +00:00
|
|
|
{
|
|
|
|
return i - j;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
1996-04-17 19:26:04 +00:00
|
|
|
o_int_is_equal(int i, int j)
|
1996-03-22 00:37:53 +00:00
|
|
|
{
|
|
|
|
return i == j;
|
|
|
|
}
|
|
|
|
|
|
|
|
const void *
|
1996-04-17 19:26:04 +00:00
|
|
|
o_int_retain(int i)
|
1996-03-22 00:37:53 +00:00
|
|
|
{
|
|
|
|
return (const void *)i;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
1996-04-17 19:26:04 +00:00
|
|
|
o_int_release(int i)
|
1996-03-22 00:37:53 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
NSString *
|
1996-04-17 19:26:04 +00:00
|
|
|
o_int_describe(int i)
|
1996-03-22 00:37:53 +00:00
|
|
|
{
|
|
|
|
/* FIXME: Code this. */
|
|
|
|
return nil;
|
|
|
|
}
|
|
|
|
|
|
|
|
|