guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 04/06: Deprecate 'scm_string_hash'.


From: Ludovic Courtès
Subject: [Guile-commits] 04/06: Deprecate 'scm_string_hash'.
Date: Sun, 11 Jan 2015 21:54:25 +0000

civodul pushed a commit to branch stable-2.0
in repository guile.

commit 894d0b894daae001495c748b3352cd79918d3789
Author: Ludovic Courtès <address@hidden>
Date:   Sun Jan 11 22:11:17 2015 +0100

    Deprecate 'scm_string_hash'.
    
    This function has been unused internally for some time and is undocumented.
    
    * libguile/hash.c (scm_string_hash): Wrap if #if SCM_ENABLE_DEPRECATED
      == 1.
    * libguile/hash.h (scm_string_hash): Likewise, and replace SCM_API with
      SCM_DEPRECATED.
---
 libguile/hash.c |    8 ++++++--
 libguile/hash.h |   12 ++++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/libguile/hash.c b/libguile/hash.c
index 3429310..e5568ee 100644
--- a/libguile/hash.c
+++ b/libguile/hash.c
@@ -1,5 +1,5 @@
 /* Copyright (C) 1995, 1996, 1997, 2000, 2001, 2003, 2004, 2006, 2008,
- *   2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
+ *   2009, 2010, 2011, 2012, 2014, 2015 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -47,7 +47,9 @@ extern double floor();
 
 #define SCM_MIN(A, B) ((A) < (B) ? (A) : (B))
 
-unsigned long 
+#if SCM_ENABLE_DEPRECATED == 1
+
+unsigned long
 scm_string_hash (const unsigned char *str, size_t len)
 {
   /* from suggestion at: */
@@ -59,6 +61,8 @@ scm_string_hash (const unsigned char *str, size_t len)
   return h;
 }
 
+#endif
+
 unsigned long 
 scm_i_string_hash (SCM str)
 {
diff --git a/libguile/hash.h b/libguile/hash.h
index 3077486..735f8c8 100644
--- a/libguile/hash.h
+++ b/libguile/hash.h
@@ -3,7 +3,8 @@
 #ifndef SCM_HASH_H
 #define SCM_HASH_H
 
-/* Copyright (C) 1995,1996,2000, 2006, 2008, 2011 Free Software Foundation, 
Inc.
+/* Copyright (C) 1995, 1996, 2000, 2006, 2008, 2011,
+ *   2015 Free Software Foundation, Inc.
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -27,7 +28,14 @@
 
 
 
-SCM_API unsigned long scm_string_hash (const unsigned char *str, size_t len);
+#if SCM_ENABLE_DEPRECATED == 1
+
+/* Deprecated in 2.0.12.  */
+SCM_DEPRECATED unsigned long scm_string_hash (const unsigned char *str,
+                                             size_t len);
+
+#endif
+
 SCM_INTERNAL unsigned long scm_i_locale_string_hash (const char *str,
                                                      size_t len);
 SCM_INTERNAL unsigned long scm_i_latin1_string_hash (const  char *str,



reply via email to

[Prev in Thread] Current Thread [Next in Thread]