[Groonga-commit] groonga/grngo at a243ba8 [master] Rename initCount to grnInitCount.

Back to archive index

susumu.yata null+****@clear*****
Fri Jun 26 11:51:03 JST 2015


susumu.yata	2015-06-26 11:51:03 +0900 (Fri, 26 Jun 2015)

  New Revision: a243ba828748caa9247ec07dec645924eb9e48d6
  https://github.com/groonga/grngo/commit/a243ba828748caa9247ec07dec645924eb9e48d6

  Message:
    Rename initCount to grnInitCount.
    
    GitHub: #9

  Modified files:
    grngo.go

  Modified: grngo.go (+9 -9)
===================================================================
--- grngo.go    2015-06-26 11:49:06 +0900 (a6943e7)
+++ grngo.go    2015-06-26 11:51:03 +0900 (db5d9d5)
@@ -159,22 +159,22 @@ func NewColumnOptions() *ColumnOptions {
 
 // -- Groonga --
 
-// initCount is an internal counter used in Init and Fin.
-var initCount = 0
+// grnInitCount is an internal counter used in Init and Fin.
+var grnInitCount = 0
 
 // DisableInitCount disables Init and Fin, so that Grngo does not implicitly
 // initialize and finalize Groonga.
 // DisableInitCount should be used if you manually or another library
 // initialize and finalize Groonga.
 func DisableInitCount() {
-	initCount = -1
+	grnInitCount = -1
 }
 
 // GrnInit initializes Groonga if needed.
-// initCount is incremented and when it changes from 0 to 1, Groonga is
+// grnInitCount is incremented and when it changes from 0 to 1, Groonga is
 // initialized.
 func GrnInit() error {
-	switch initCount {
+	switch grnInitCount {
 	case -1: // Disabled.
 		return nil
 	case 0:
@@ -182,15 +182,15 @@ func GrnInit() error {
 			return fmt.Errorf("grn_init() failed: rc = %d", rc)
 		}
 	}
-	initCount++
+	grnInitCount++
 	return nil
 }
 
 // Fin finalizes Groonga if needed.
-// initCount is decremented and when it changes from 1 to 0, Groonga is
+// grnInitCount is decremented and when it changes from 1 to 0, Groonga is
 // finalized.
 func GrnFin() error {
-	switch initCount {
+	switch grnInitCount {
 	case -1: // Disabled.
 		return nil
 	case 0:
@@ -200,7 +200,7 @@ func GrnFin() error {
 			return fmt.Errorf("grn_fin() failed: rc = %d", rc)
 		}
 	}
-	initCount--
+	grnInitCount--
 	return nil
 }
 
-------------- next part --------------
HTML����������������������������...
Descargar 



More information about the Groonga-commit mailing list
Back to archive index