[Groonga-commit] groonga/grngo at ab2015e [master] Update comments for Groonga management functions.

Back to archive index

susumu.yata null+****@clear*****
Wed Jun 24 10:41:21 JST 2015


susumu.yata	2015-06-24 10:41:21 +0900 (Wed, 24 Jun 2015)

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

  Message:
    Update comments for Groonga management functions.
    
    GitHub: #8

  Modified files:
    grngo.go

  Modified: grngo.go (+9 -8)
===================================================================
--- grngo.go    2015-06-24 10:20:48 +0900 (3dbc087)
+++ grngo.go    2015-06-24 10:41:21 +0900 (e0c2fbd)
@@ -161,17 +161,18 @@ func NewColumnOptions() *ColumnOptions {
 
 // -- Groonga --
 
-// initCount is a counter for automatically initializing and finalizing
-// Groonga.
+// initCount is an internal counter used in Init and Fin.
 var initCount = 0
 
-// DisableInitCount() disables initCount.
-// This is useful if you want to manyally initialize and finalize Groonga.
+// 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
 }
 
-// Init() initializes Groonga if needed.
+// Init initializes Groonga if needed.
 // initCount is incremented and when it changes from 0 to 1, Groonga is
 // initialized.
 func Init() error {
@@ -187,7 +188,7 @@ func Init() error {
 	return nil
 }
 
-// Fin() finalizes Groonga if needed.
+// Fin finalizes Groonga if needed.
 // initCount is decremented and when it changes from 1 to 0, Groonga is
 // finalized.
 func Fin() error {
@@ -205,7 +206,7 @@ func Fin() error {
 	return nil
 }
 
-// openCtx() allocates memory for grn_ctx and initializes it.
+// openCtx returns a new grn_ctx.
 func openCtx() (*C.grn_ctx, error) {
 	if err := Init(); err != nil {
 		return nil, err
@@ -218,7 +219,7 @@ func openCtx() (*C.grn_ctx, error) {
 	return ctx, nil
 }
 
-// closeCtx() finalizes grn_ctx and frees allocated memory.
+// closeCtx finalizes a grn_ctx.
 func closeCtx(ctx *C.grn_ctx) error {
 	rc := C.grn_ctx_close(ctx)
 	Fin()
-------------- next part --------------
HTML����������������������������...
Download 



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